#include<bits/stdc++.h>
using namespace std;
const int N=1e5+10;
int n,r[N],t[N],s,ans;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int i,j;
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        scanf("%d",&r[i]);
    }
    sort(r+1,r+n+1);
    for(i=1;i<=n;i++){
        t[i]=r[i];
    }
    for(i=1,j=1;j<=n;i++){
        while(j<=n&&t[j]<=r[i]){
            j++;
        }
        if(j<=n){
            s++;
        }
        j++;
    }
    ans=n-s;
    cout<<ans;
    return 0;
}
